from redis import StrictRedis
import json

REDIS_URL = f'redis://r-2zer2v9lrdl75a694s:tianmai_2018@r-2zer2v9lrdl75a694spd.redis.rds.aliyuncs.com:6379/14'
conn = StrictRedis.from_url(REDIS_URL, encoding='utf-8', decode_responses=True)

for i in range(1,36):
    next_url = f'https://china.guidechem.com/product/listc_catid-2512-p{i}.html'
    record = {
        'url': next_url
    }
    conn.sadd('chinaguidechem_product_bak:pages', json.dumps(record, ensure_ascii=False))